import Vuex from 'vuex'

export default () => {
    return new Vuex.Store({
        // 严格模式
        strict: process.env.NODE_ENV !== 'production',
        state: {
            count: 0
        },
        getters: {
            count: state => state.count
        },
        mutations: {
            updateCount(state) {
                console.info('state', state)
                state.count++
            }
        }
    })
}